package com.wsoft.form.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wsoft.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 自定义表单-虚拟字段表
 * </p>
 *
 * @author Z001
 * @since 2024年08月29日 09:11:06
 */
@Getter
@Setter
@TableName("wf_form_virtual_column")
@Schema(name = "WfFormVirtualColumnEntity", description = "自定义表单-虚拟字段表")
public class WfFormVirtualColumnEntity extends BaseEntity {

    @Schema(description = "formId")
    @TableField("form_id")
    private Long formId;

    @Schema(description = "所在表Id")
    @TableField("table_id")
    private Long tableId;

    @Schema(description = "虚拟字段名称")
    @TableField("column_name")
    private String columnName;

    @Schema(description = "虚拟字段类型")
    @TableField("column_type")
    private String columnType;

    @Schema(description = "字段提示名")
    @TableField("column_prompt")
    private String columnPrompt;

    @Schema(description = "聚合字段所在关联表Id")
    @TableField("aggregation_table_id")
    private Long aggregationTableId;

    @Schema(description = "关联表聚合字段Id")
    @TableField("aggregation_column_id")
    private Long aggregationColumnId;

    @Schema(description = "聚合类型(0: sum 1: count 2: avg 3: min 4: max)")
    @TableField("aggregation_type")
    private Integer aggregationType;

    @Schema(description = "存储过滤条件的json")
    @TableField("where_clause_json")
    private String whereClauseJson;

    @Schema(description = "data格式类型")
    @TableField("data_type")
    private String dataType;
}
